//
//  Homekindview.m
//  geiTA
//
//  Created by duyan on 14-11-20.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "Homekindview.h"

@implementation Homekindview

- (void)dealloc
{
    [_Sutdent release];
    [_worker release];
    [_FM release];
    [_girlfriend release];
    [_girl release];
    [_boy release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.worker = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width / 2.5, 20, frame.size.width / 4.0, frame.size.width / 4.0)];
        [_worker setBackgroundColor:[UIColor yellowColor]];
        self.boy = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width / 12, 20, frame.size.width / 4.0, frame.size.width / 4.0)];
        [_boy setBackgroundColor:[UIColor yellowColor]];
        self.girl = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width / 1.4, 20 , frame.size.width / 4.0, frame.size.width / 4.0)];
        [_girl setBackgroundColor:[UIColor yellowColor]];
        self.girlfriend = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width / 2.5, frame.size.height / 1.9, frame.size.width / 4.0, frame.size.width / 4.0)];
        [_girlfriend setBackgroundColor:[UIColor yellowColor]];
        self.FM  = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width / 1.4, frame.size.height / 1.9, frame.size.width / 4.0 , frame.size.width / 4.0)];
        self.Sutdent  = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width / 12,  frame.size.height / 1.9 , frame.size.width / 4.0, frame.size.width / 4.0)];
        [_FM setBackgroundColor:[UIColor yellowColor]];
        [_Sutdent setBackgroundColor:[UIColor yellowColor]];
        [self addSubview:_Sutdent];
        [self addSubview: _FM];
        [self addSubview:_girlfriend];
        [self addSubview:_girl];
        [self addSubview:_boy];
        [self addSubview:_worker];
        [_Sutdent release];
        [_FM release];
        [_girl release];
        [_boy release];
        [_worker release];
        [_girlfriend release];
        
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.worker.clipsToBounds = YES;
    self.worker.layer.cornerRadius = self.worker.frame.size.width / 2;
//    self.worker.layer.borderWidth = 2;
    self.girlfriend.clipsToBounds = YES;
    self.girlfriend.layer.cornerRadius = self.worker.frame.size.width / 2;
    self.girl.clipsToBounds = YES;
    self.girl.layer.cornerRadius = self.worker.frame.size.width / 2;
    self.FM.clipsToBounds = YES;
    self.FM.layer.cornerRadius = self.worker.frame.size.width / 2;
    self.boy.clipsToBounds = YES;
    self.boy.layer.cornerRadius = self.worker.frame.size.width / 2;
    self.Sutdent.clipsToBounds = YES;
    self.Sutdent.layer.cornerRadius = self.worker.frame.size.width / 2;


}

@end
